package org.hardstone.domain.note.resource;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import org.hardstone.domain.BaseItemDomain;
import org.hardstone.domain.BaseCategory;
import org.hardstone.domain.Status;

@Entity
@Table(name = "BuildFile")
public class BuildFile extends BaseItemDomain<Long> {

    @Column(name = "file_name")
    private String fileName;  // Build file name

    @Column(name = "file_content")
    private String fileContent;  // Build file content

    @Column(name = "file_tags")
    private String fileTags;  // Build file tags

    @Column(name = "file_url")
    private String fileUrl;  // Build file URL

    @Column(name = "file_create_date")
    private String fileCreateDate;  // Creation date

    @Column(name = "file_modify_date")
    private String fileModifyDate;  // Last modification date

    public BuildFile() {
        super();
        this.fileName = "";
        this.fileContent = "";
        this.fileTags = "";
        this.fileUrl = "";
        this.fileCreateDate = "";
        this.fileModifyDate = "";
    }
    
    public BuildFile(Long id, Long itemGroupId, String name, BaseCategory category, Long userId, Long userGroupId, int authority, String url, String description, Status status, String askDate, String modifyDate, String tags, String attribute) {
        super(id, itemGroupId, name, category, userId, userGroupId, authority, url, description, status, askDate, modifyDate, tags, attribute);
        
    }
    public BuildFile(Long id, Long itemGroupId, String name, BaseCategory category, Long userId, Long userGroupId, int authority, String url, String description, Status status, String askDate, String modifyDate, String tags, String attribute, String fileName, String fileContent, String fileTags, String fileUrl, String fileCreateDate, String fileModifyDate) {
        super(id, itemGroupId, name, category, userId, userGroupId, authority, url, description, status, askDate, modifyDate, tags, attribute);
        this.fileName = fileName;
        this.fileContent = fileContent;
        this.fileTags = fileTags;
        this.fileUrl = fileUrl;
        this.fileCreateDate = fileCreateDate;
        this.fileModifyDate = fileModifyDate;
    }

    public BuildFile(String fileName, String fileContent, String fileTags, String fileUrl, String fileCreateDate, String fileModifyDate) {
        this.fileName = fileName;
        this.fileContent = fileContent;
        this.fileTags = fileTags;
        this.fileUrl = fileUrl;
        this.fileCreateDate = fileCreateDate;
        this.fileModifyDate = fileModifyDate;
    }

    // Getter and setter methods
    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFileContent() {
        return fileContent;
    }

    public void setFileContent(String fileContent) {
        this.fileContent = fileContent;
    }

    public String getFileTags() {
        return fileTags;
    }

    public void setFileTags(String fileTags) {
        this.fileTags = fileTags;
    }

    public String getFileUrl() {
        return fileUrl;
    }

    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }

    public String getFileCreateDate() {
        return fileCreateDate;
    }

    public void setFileCreateDate(String fileCreateDate) {
        this.fileCreateDate = fileCreateDate;
    }

    public String getFileModifyDate() {
        return fileModifyDate;
    }

    public void setFileModifyDate(String fileModifyDate) {
        this.fileModifyDate = fileModifyDate;
    }
    @Override
    public String toString() {
        return "BuildFile{" +
                "fileName='" + fileName + '\'' +
                ", fileContent='" + fileContent + '\'' +
                ", fileTags='" + fileTags + '\'' +
                ", fileUrl='" + fileUrl + '\'' +
                ", fileCreateDate='" + fileCreateDate + '\'' +
                ", fileModifyDate='" + fileModifyDate + '\'' +
                ", id=" + id +
                ", itemGroupId=" + itemGroupId +
                ", name='" + name + '\'' +
                ", baseCategory=" + baseCategory +
                ", userId=" + userId +
                ", userGroupId=" + userGroupId +
                ", authority=" + authority +
                ", url='" + url + '\'' +
                ", description='" + description + '\'' +
                ", status=" + status +
                ", askDate='" + askDate + '\'' +
                ", modifyDate='" + modifyDate + '\'' +
                ", tags='" + tags + '\'' +
                ", attribute='" + attribute + '\'' +
                '}';
    }
}

